home *** CD-ROM | disk | FTP | other *** search
/ Risc World 7 / Risc World 7.iso / Software / Issue6 / SDL.ZIP / !LibU / bin / libpng12-config < prev   
Text File  |  2006-09-20  |  2KB  |  124 lines

  1. #! /bin/sh
  2.  
  3. # libpng-config
  4. # provides configuration info for libpng.
  5.  
  6. # Copyright (C) 2002 Glenn Randers-Pehrson
  7. # For conditions of distribution and use, see copyright notice in png.h
  8.  
  9. # Modeled after libxml-config.
  10.  
  11. version=1.2.8
  12. prefix=""
  13. libdir=""
  14. libs=""
  15. I_opts=""
  16. L_opts=""
  17. R_opts=""
  18. cppflags=""
  19. ccopts=""
  20. ldopts=""
  21.  
  22. prefix="/home/riscos/env"
  23. I_opts="-I/home/riscos/env/include/libpng12"
  24. L_opts="-L/home/riscos/env/lib"
  25. R_opts=""
  26. libs="-lpng12 -lz -lm"
  27.  
  28. usage()
  29. {
  30.     cat <<EOF
  31. Usage: libpng-config [OPTION] ...
  32.  
  33. Known values for OPTION are:
  34.  
  35.   --prefix        print libpng prefix
  36.   --libdir        print path to directory containing library
  37.   --libs          print library linking information
  38.   --ccopts        print compiler options
  39.   --cppflags      print pre-processor flags
  40.   --cflags        print preprocessor flags, I_opts, and compiler options
  41.   --I_opts        print "-I" include options
  42.   --L_opts        print linker "-L" flags for dynamic linking
  43.   --R_opts        print dynamic linker "-R" or "-rpath" flags
  44.   --ldopts        print linker options
  45.   --ldflags       print linker flags (ldopts, L_opts, R_opts, and libs)
  46.   --static        revise subsequent outputs for static linking
  47.   --help          print this help and exit
  48.   --version       print version information
  49. EOF
  50.  
  51.     exit $1
  52. }
  53.  
  54. if test $# -eq 0; then
  55.     usage 1
  56. fi
  57.  
  58. while test $# -gt 0; do
  59.     case "$1" in
  60.  
  61.     --prefix)
  62.         echo ${prefix}
  63.         ;;
  64.  
  65.     --version)
  66.         echo ${version}
  67.         exit 0
  68.         ;;
  69.  
  70.     --help)
  71.         usage 0
  72.         ;;
  73.  
  74.     --ccopts)
  75.         echo ${ccopts}
  76.         ;;
  77.  
  78.     --cppflags)
  79.         echo ${cppflags}
  80.         ;;
  81.  
  82.     --cflags)
  83.         echo ${I_opts} ${cppflags} ${ccopts}
  84.         ;;
  85.  
  86.     --libdir)
  87.         echo ${libdir}
  88.         ;;
  89.  
  90.     --libs)
  91.         echo ${libs}
  92.         ;;
  93.  
  94.     --I_opts)
  95.         echo ${I_opts}
  96.         ;;
  97.  
  98.     --L_opts)
  99.         echo ${L_opts}
  100.         ;;
  101.  
  102.     --R_opts)
  103.         echo ${R_opts}
  104.         ;;
  105.  
  106.     --ldflags)
  107.         echo ${ldflags} ${L_opts} ${R_opts} ${libs}
  108.         ;;
  109.  
  110.     --static)
  111.         R_opts=""
  112.         libs=${all_libs}
  113.         ;;
  114.  
  115.     *)
  116.         usage
  117.         exit 1
  118.         ;;
  119.     esac
  120.     shift
  121. done
  122.  
  123. exit 0
  124.